// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: fullnames deadcode fieldsfirst nonlb
// Source File Name:   Point2D.java

package org.frankkie.parcdroidprj;

public abstract class mijnPoint2D
    implements java.lang.Cloneable {
    public static class Double extends mijnPoint2D
        implements java.io.Serializable {

        public double x;
        public double y;
        private static final long serialVersionUID = 0x555bf8ca09a31d5fL;

        public double getX() {
            return x;
        }

        public double getY() {
            return y;
        }

        public void setLocation(double x, double y) {
            this.x = x;
            this.y = y;
        }

        @Override
        public java.lang.String toString() {
            return (new StringBuilder()).append("Point2D.Double[").append(x).append(", ").append(y).append("]").toString();
        }

        public Double() {
        }

        public Double(double x, double y) {
            this.x = x;
            this.y = y;
        }
    }

    public static class Float extends mijnPoint2D
        implements java.io.Serializable {

        public float x;
        public float y;
        private static final long serialVersionUID = 0xd829ad90dabae342L;

        public double getX() {
            return (double)x;
        }

        public double getY() {
            return (double)y;
        }

        public void setLocation(double x, double y) {
            this.x = (float)x;
            this.y = (float)y;
        }

        public void setLocation(float x, float y) {
            this.x = x;
            this.y = y;
        }

        @Override
        public java.lang.String toString() {
            return (new StringBuilder()).append("Point2D.Float[").append(x).append(", ").append(y).append("]").toString();
        }

        public Float() {
        }

        public Float(float x, float y) {
            this.x = x;
            this.y = y;
        }
    }


    protected mijnPoint2D() {
    }

    public abstract double getX();

    public abstract double getY();

    public abstract void setLocation(double d, double d1);

    public void setLocation(mijnPoint2D p) {
        setLocation(p.getX(), p.getY());
    }

    public static double distanceSq(double x1, double y1, double x2, double y2) {
        x1 -= x2;
        y1 -= y2;
        return x1 * x1 + y1 * y1;
    }

    public static double distance(double x1, double y1, double x2, double y2) {
        x1 -= x2;
        y1 -= y2;
        return java.lang.Math.sqrt(x1 * x1 + y1 * y1);
    }

    public double distanceSq(double px, double py) {
        px -= getX();
        py -= getY();
        return px * px + py * py;
    }

    public double distanceSq(mijnPoint2D pt) {
        double px = pt.getX() - getX();
        double py = pt.getY() - getY();
        return px * px + py * py;
    }

    public double distance(double px, double py) {
        px -= getX();
        py -= getY();
        return java.lang.Math.sqrt(px * px + py * py);
    }

    public double distance(mijnPoint2D pt) {
        double px = pt.getX() - getX();
        double py = pt.getY() - getY();
        return java.lang.Math.sqrt(px * px + py * py);
    }

   // @Override
    //public java.lang.Object clone() {
     //   return super.clone();
     //   java.lang.CloneNotSupportedException e;
      //  e;
       // throw new InternalError();
   // }

    @Override
    public int hashCode() {
        long bits = java.lang.Double.doubleToLongBits(getX());
        bits ^= java.lang.Double.doubleToLongBits(getY()) * 31L;
        return (int)bits ^ (int)(bits >> 32);
    }

    @Override
    public boolean equals(java.lang.Object obj) {
        if(obj instanceof mijnPoint2D) {
            mijnPoint2D p2d = (mijnPoint2D)obj;
            return getX() == p2d.getX() && getY() == p2d.getY();
        } else {
            return super.equals(obj);
        }
    }
}